/**
 * 
 */
package com.magnusart.scrumify.dao;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

import com.magnusart.scrumify.dao.CommonDAO;
import com.magnusart.scrumify.dao.DAOFactory;
import com.magnusart.scrumify.dao.HsqlDbDAOFactory;
import com.magnusart.scrumify.dao.HsqlDbProjectDAO;
import com.magnusart.scrumppm.model.Project;
import com.magnusart.scrumppm.model.ProjectBuilder;
/**
 * Test Project DAO actions for HSQLDB
 * @author Magnus Andersson
 *
 */
public class FactoryDAOActions
{
	private DAOFactory factory;
	private CommonDAO<Project, Project, ProjectBuilder> project;
	
	@Test
	public void factoryShouldBeOfHsqlDbType() throws Exception {
		factory = DBTestUtil.generateFactory( );
		assertTrue( factory instanceof HsqlDbDAOFactory );
	}
	
	@Test
	public void projectDaoShouldBeOfHsqlDbType() throws Exception {
		DAOFactory factory = DAOFactory.getDAOFactory( );
		project = factory.getProjectDAO();
		assertTrue( project instanceof HsqlDbProjectDAO );
	}
}
 